<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<!-- 头部导航栏 -->
<jsp:include page="../header.jsp"></jsp:include>
<title>===标题===</title>
<script type="text/javascript">
$(document).ready(function() {
	//提交表单验证
	$("#data_form").submit(function () {
				
		//用户名称合法性验证
		var name = $("#id_name").val();
		if(!name) {
			alert("请输入合法的用户名称信息！");return false;
		}
		
		//生日合法性验证
		var birthday = $("#id_birthday").val();
		if(!birthday) {
			alert("请输入合法的生日信息！");return false;
		}
		
		//地址合法性验证
		var address = $("#id_address").val();
		if(!address) {
			alert("请输入合法的地址信息！");return false;
		}
		
		//最高学位合法性验证
		var apsae = $("#id_apsae").val();
		if(!apsae) {
			alert("请输入合法的最高学位信息！");return false;
		}
		
		//工作单位合法性验证
		var work = $("#id_work").val();
		if(!work) {
			alert("请输入合法的工作单位信息！");return false;
		}
		
		//年龄合法性验证
		var age = $("#id_age").val();
		if(!age) {
			alert("请输入合法的年龄信息！");return false;
		}
		
		//电话号码合法性验证
		var telephone = $("#id_telephone").val();
		if(!telephone) {
			alert("请输入合法的电话号码信息！");return false;
		}
		
		//性别合法性验证
		var gender = $("#id_gender").val();
		if(!gender) {
			alert("请输入合法的性别信息！");return false;
		}
	});
});
</script>
</head>
<body>
	<div class="container dz-main">
		<!--标题和按钮组===begin===-->
		<div class="dz-head">
			<div class="dz-title">管理</div>
			<div class="dz-head-btns">
				<a class="btn btn-success btn-sm" href="<%=request.getContextPath()%>/test/testUser/index.do">返回</a>
			</div>
		</div>
		<!--标题和按钮组===end===-->
		<!--表单数据===begin===-->
		<form id="data_form" class="form-horizontal" action="<%=request.getContextPath()%>/test/testUser/save.do" method="post">
			<div>
				<input type="hidden" name="userId" value="${obj.userId}"/>
			</div>
			<div class="form-group">
				<label for="id_name" class="col-xs-2 control-label">用户名称</label>
				<div class="col-xs-6">
					<input id="id_name" type="text" class="form-control" name="name" value="${obj.name}"/>
				</div>
				<div class="col-xs-4">
					<p class="form-control-static"></p>
				</div>
			</div>
			<div class="form-group">
				<label for="id_birthday" class="col-xs-2 control-label">生日</label>
				<div class="col-xs-6">
					<input id="id_birthday" type="text" class="form-control" name="birthday" value="${obj.birthday}"/>
				</div>
				<div class="col-xs-4">
					<p class="form-control-static"></p>
				</div>
			</div>
			<div class="form-group">
				<label for="id_address" class="col-xs-2 control-label">地址</label>
				<div class="col-xs-6">
					<input id="id_address" type="text" class="form-control" name="address" value="${obj.address}"/>
				</div>
				<div class="col-xs-4">
					<p class="form-control-static"></p>
				</div>
			</div>
			<div class="form-group">
				<label for="id_apsae" class="col-xs-2 control-label">最高学位</label>
				<div class="col-xs-6">
					<input id="id_apsae" type="text" class="form-control" name="apsae" value="${obj.apsae}"/>
				</div>
				<div class="col-xs-4">
					<p class="form-control-static"></p>
				</div>
			</div>
			<div class="form-group">
				<label for="id_work" class="col-xs-2 control-label">工作单位</label>
				<div class="col-xs-6">
					<input id="id_work" type="text" class="form-control" name="work" value="${obj.work}"/>
				</div>
				<div class="col-xs-4">
					<p class="form-control-static"></p>
				</div>
			</div>
			<div class="form-group">
				<label for="id_age" class="col-xs-2 control-label">年龄</label>
				<div class="col-xs-6">
					<input id="id_age" type="text" class="form-control" name="age" value="${obj.age}"/>
				</div>
				<div class="col-xs-4">
					<p class="form-control-static"></p>
				</div>
			</div>
			<div class="form-group">
				<label for="id_telephone" class="col-xs-2 control-label">电话号码</label>
				<div class="col-xs-6">
					<input id="id_telephone" type="text" class="form-control" name="telephone" value="${obj.telephone}"/>
				</div>
				<div class="col-xs-4">
					<p class="form-control-static"></p>
				</div>
			</div>
			<div class="form-group">
				<label for="id_gender" class="col-xs-2 control-label">性别</label>
				<div class="col-xs-6">
					<input id="id_gender" type="text" class="form-control" name="gender" value="${obj.gender}"/>
				</div>
				<div class="col-xs-4">
					<p class="form-control-static"></p>
				</div>
			</div>
			<div class="dz-submit-b">
				<button type="submit" class="btn btn-primary">保存</button>
			</div>
		</form>
		<!--表单数据===end===-->
	</div>
</body>
</html>